#include "motionmodel.h"

void object_init(struct object_s *obj,float mass)
{
    obj->mass     = mass;
    obj->force    = 0;
    obj->position = 0;
    obj->velocity = 0;
    obj->accel    = 0;
}

void object_update(struct object_s *obj,float force,float dt)
{
    obj->force = force;
    obj->accel = force / obj->mass;
    obj->velocity += obj->accel * dt;
    obj->position += obj->velocity * dt;
}